﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Web;
using System.Web.UI;
using System.Web.UI.WebControls;
using NCT.Framework;
using VISS.API.Users;

namespace VISS.Web.Frontend.Modules.User.Profile {
    public partial class SendMessagePage : System.Web.UI.Page {

        protected void Page_Load(object sender, EventArgs e) {
            string reportedUserKey = ConvertUtils.ToString(Request.QueryString["reportedUserKey"], "");
            if (reportedUserKey == "") {
                idSendReport.WrongInputData = true;
                return;
            }

            UserGeneralProfileEnt generalProfileEnt = StructureMapFactory.GetInstance<IUserGeneralProfile>().GetByUserKey(reportedUserKey);

            if (generalProfileEnt == null) {
                idSendReport.WrongInputData = true;
                return;
            }

            idSendReport.ReportedUserKey = generalProfileEnt.UserKey;
            idSendReport.ReportedName = generalProfileEnt.Name;
        }
    }
}
